package com.example.service;

import com.example.domain.Department;
import com.example.domain.ExcelData;
import com.example.domain.Training;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;
import java.util.List;

/**
 * @author luo
 */

public interface DepartmentService {
    /**
     * 查询所有部门
     * @return
     */
    public List<Department> selectAllDepart();

    /**
     * 按id查询部门
     * @return
     */
    public Department selectDepartmentById(Integer id);

    /**
     * 模糊查询
     * @param department
     * @return
     */
    public List<Department> selectDepartmentByName(Department department);
    /**
     * 添加部门
     * @param department
     * @return
     */
    public int addDepartment(Department department);

    /**
     * 更新部门
     *
     * @param department
     * @return
     */
    public int updateDepartment(Department department);

    /**
     * 根据id删除部门
     * @param id
     * @return
     */
    public int deleteDepartment(Integer id);
    /**
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    public PageInfo<Department> findPage(int page, int size);

    /**
     * 打印
     * @return
     */
    public ExcelData getOutputExcelProjectData();
}
